package edu.ynu.se.xiecheng.achitectureclass.controller;


import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import edu.ynu.se.xiecheng.achitectureclass.domain.Result;
import edu.ynu.se.xiecheng.achitectureclass.dao.BusinessDao;
import edu.ynu.se.xiecheng.achitectureclass.domain.entity.Business;
import edu.ynu.se.xiecheng.achitectureclass.service.BusinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "商家控制器")
@RestController
@RequestMapping("/business")
public class BusinessController extends LogicController<BusinessService, BusinessDao, Business,Long> {

    public BusinessController(BusinessService ls) {
        super(ls);
    }

    @GetMapping("/getAllBusiness")
    @ApiOperation("获取所有商家")
    public Result getAllBusiness(int size ,int page){
        return getService().getAllBusiness(size,page);
    }

}
